home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -serious- / programming / other / tandem / teaching / 20.asm < prev    next >
Assembly Source File  |  1999-09-06  |  959b  |  38 lines

  1. * 20.asm    try out an include    version 0.00 1.9.97
  2.  
  3.  bra Start
  4.  
  5. *                        **** IMPORTANT ****
  6. *
  7. * The INCLUDE below assumes that Tandem is at the root of its device, e.g.
  8. * in WORK:. If it is not, modify the path :Tandem/Teaching/20.i so
  9. * 16.i will be found. (Later I will introduce TLprogdir to solve this
  10. * problem)
  11.  
  12.  include ':Tandem/Teaching/20.i'     ;(includes subroutine Beep)
  13.  
  14.  xref _AbsExecBase
  15.  xref _LVOOpenLibrary
  16.  xref _LVOCloseLibrary
  17.  
  18. intname: dc.b 'intuition.library',0
  19.  ds.w 0
  20. intbase: ds.l 1
  21.  
  22. Start:
  23.  move.l _AbsExecBase,a6   ;open intuition.library
  24.  lea intname,a1
  25.  moveq #37,d0             ;at least release 2.04
  26.  jsr _LVOOpenLibrary(a6)
  27.  move.l d0,intbase
  28.  beq.s Abort              ;go if can't open
  29.  bsr Beep                 ;beep screens
  30.  move.l a6,a1
  31.  move.l _AbsExecBase,a6
  32.  jsr _LVOCloseLibrary(a6) ;close intuition.library
  33.  clr.l d0                 ;quit good
  34.  rts
  35. Abort:
  36.  moveq #-1,d0             ;quit bad
  37.  rts
  38.